This application is based on and incorporates herein by reference Japanese Patent Application No. 2000-84121 filed Mar. 24, 2000.
This invention relates to a vehicle control apparatus, which is capable of reusing control programs and reducing processing timing delay in distributed processing.
Vehicle control apparatuses control a vehicle by executing programmed computation processing based on vehicle information from sensors and outputting driving information to actuators in accordance with results of the computation processing. This vehicle control is realized by executing vehicle control programs. These vehicle control programs has been contrived so that application programs may be reused.
In one proposal, an ECU is loaded with a program which is divided, as shown in FIG. 7, into an application layer 610, an interface layer 620, and a hardware layer 700. Each layer is a unit of programs. The application layer 610 is made up of processing programs for executing the computation processing. The hardware layer 700 has a virtual sensor part 630 made up of processing programs for acquiring vehicle information detected by sensors, a virtual actuator part 640 made up of processing programs for outputting driving information to actuators, and a communication driver 650 which is a processing program for executing communication with other ECUs. By separating the hardware layer (processing programs dependent on hardware) 700, which might change with vehicle type or grade or the like, from the application layer 610, the application layer 610 can be used as it is and the application programs can be reused, even if the hardware is changed.
In practice, multiple ECUs (for instance, A-ECU and B-ECU) are connected via a communication line 500 as shown in FIG. 8 for distributed processing. In FIG. 8, it is assumed that an actuator driven by the virtual actuator part 640a of the A-ECU is controlled with computation results of the application layer 610b of the B-ECU.
At this time, because the interface layer 620b of the B-ECU manages the whereabouts of the processing program that is the output destination of the driving information, the application layer 610b of the B-ECU does not need the information of where the processing program to which the driving information should be outputted is. That is, position freedom or transparency is realized by the interface layer 620b. 
Specifically, the interface layer 620b determines an output destination specified from the application layer 610b of the B-ECU, and via the communication driver 650b sends the driving information to the A-ECU. That is, the driving information is transferred in the order of B-ECU communication driver 650bxe2x86x92communication line 500xe2x86x92A-ECU communication driver 650axe2x86x92A-ECU interface layer 620axe2x86x92A-ECU virtual actuator part 640a. Thus, in the application layer 610b of the B-ECU, even if the processing program for driving the hardware that is the subject of control exists as a processing program in a different ECU, there is no need whatsoever for that to be considered. Consequently, distributed processing among multiple ECUs can be realized easily. Here it is to be noted that xe2x80x98the application does . . . xe2x80x99 means that by a CPU of the ECU executing a processing program constructed as an application layer a function of the application layer is exhibited. However, for brevity, expressions having the processing program as the subject will be suitably used.
When the above program construction is employed in control of an engine, a drive train and the like, relatively high real-time operation is required. However, there maybe cases in which the distributed processing cannot be realized. For example, in FIG. 8, there is a possibility of driving information from the application layer 610b of the B-ECU not being transferred to the virtual actuator part 640a of the A-ECU in real time. It is assumed here that an injection system wherein an injector is driven by the virtual actuator part 640a of the A-ECU and the injector is controlled by the application layer 610b of the B-ECU. In this case, it is necessary for an injection command from the application layer 610b of the B-ECU to be sent to the virtual actuator part 640a of the A-ECU in real time. However, when the communication line 500 is being used for other communication, the transfer of driving information is delayed.
This will also happen in inputting of vehicle information from the various sensors. The vehicle information acquired by the virtual sensor part 630 shown in FIG. 7 is sampled and averaged by the application layer 610 at intervals of for example 1 ms. However, if distributed processing is tried, because communication processing via the communication line 500 is carried out, the application layer 610b of the B-ECU cannot sample vehicle information acquired by the virtual sensor part 630a of the A-ECU at intervals of 1 ms.
The present invention has an object of making possible distributed processing even in control which requires relatively high real-time operation, while ensuring reusability of application programs constituting vehicle control programs.
According to the present invention, a vehicle control apparatus has multiple control units which are loaded with vehicle control programs distributedly. The vehicle control program in each control unit includes an application layer for executing the computation processing, and a sensor/actuator layer for executing processing of vehicle information from sensors and driving information for actuators.
The vehicle control program further includes an interface layer for acquiring and sending to another control unit the driving information from the application layer and also acquiring the driving information sent from the another control unit. It also includes an information control layer for outputting to the sensor/actuator layer at suitable timing the driving information acquired by the interface layer. Preferably, the application layer outputs the driving information in a fixed form, and the information control layer converts to information directly processable by the sensor/actuator layer and outputs the driving information.
Alternatively, the vehicle control program further includes an information control layer for at suitable timing acquiring and outputting the vehicle information acquired by the sensor/actuator layer. It further includes an interface layer for acquiring and outputting to the application layer the vehicle information outputted from the information control layer on the basis of a request from the application layer, making a request for the vehicle information to another control unit acquiring and outputting to the application layer the vehicle information sent with respect to this request, and sending the vehicle information from the information control layer when a request is made for the vehicle information from another control unit. Preferably, the sensor/actuator layer outputs the vehicle information in a form corresponding to the sensors, and the information control layer converts to information directly processable by the application layer and outputs the vehicle information.